package com.martian.common.exception;

import com.martian.common.enums.MovieErrorCodeEnum;
import com.martian.common.enums.UserErrorCodeEnum;

/**
 * @author martian
 * @version V1.0.0
 * @Description
 * @date 2023-03-28 15:29
 */

public class MovieException extends SysException{
    protected int code;
    public MovieException(){}
    public MovieException(String message){super(message);}
    //Object ...args java某个版本的新特性
    public MovieException(MovieErrorCodeEnum codeEnum, Object... args){
        super(String.format(codeEnum.getMessage(), args));
        this.code = codeEnum.getCode();
    }
}
